<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<title><?=$title?></title>
</head>
<style type="text/css">
img {
   background-image: url('images/eagle4.png');
}
</style>
<?php include 'connection/connection.php';
$selectallmonitor = mysql_query("SELECT mn.Name,mn.Monitor_ID FROM monitor mn");
?>
<script type="text/javascript">
function loadContentHome(){
		var i = document.getElementById('monitorid');
   		 var monitor = i.options[i.selectedIndex].value;

     if (window.XMLHttpRequest)
     {// code for IE7+, Firefox, Chrome, Opera, Safari
     xmlhttp=new XMLHttpRequest();
     }
   else
     {// code for IE6, IE5
     xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
     }
   xmlhttp.onreadystatechange=function()
     {
     if (xmlhttp.readyState==4 && xmlhttp.status==200)
       {
   	   // alert(xmlhttp.responseText);
           document.getElementById("dvcontent").innerHTML=xmlhttp.responseText;
       }
     }
   xmlhttp.open("GET","content-home/content-home.php?monitor="+monitor,true);
   xmlhttp.send();
}

function loadOneMonitor(){
	if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
    xmlhttp=new XMLHttpRequest();
    }
  else
    {// code for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  xmlhttp.onreadystatechange=function()
    {
    if (xmlhttp.readyState==4 && xmlhttp.status==200)
      {
  	   // alert(xmlhttp.responseText);
          document.getElementById("dvcontent").innerHTML=xmlhttp.responseText;
      }
    }
  var monitorone = document.getElementById('one').value;
  var monitorid = document.getElementById('monitorid').value;
  xmlhttp.open("GET","content-home/content-home.php?monitorone="+monitorone+"&monitor="+monitorid,true);
  xmlhttp.send();
}

function loadFourMonitor(){
	if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
    xmlhttp=new XMLHttpRequest();
    }
  else
    {// code for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  xmlhttp.onreadystatechange=function()
    {
    if (xmlhttp.readyState==4 && xmlhttp.status==200)
      {
  	   // alert(xmlhttp.responseText);
          document.getElementById("dvcontent").innerHTML=xmlhttp.responseText;
      }
    }
  var monitorfour = document.getElementById('four').value;
  var monitorid = document.getElementById('monitorid').value;
  xmlhttp.open("GET","content-home/content-home.php?monitor4="+monitorfour+"&monitor="+monitorid,true);
  xmlhttp.send();
}

function loadNineMonitor(){
	if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
    xmlhttp=new XMLHttpRequest();
    }
  else
    {// code for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  xmlhttp.onreadystatechange=function()
    {
    if (xmlhttp.readyState==4 && xmlhttp.status==200)
      {
  	   // alert(xmlhttp.responseText);
          document.getElementById("dvcontent").innerHTML=xmlhttp.responseText;
      }
    }
  var monitornine = document.getElementById('nine').value;
  var monitorid = document.getElementById('monitorid').value;
  xmlhttp.open("GET","content-home/content-home.php?monitor9="+monitornine+"&monitor="+monitorid,true);
  xmlhttp.send();
}

function loadSixteenMonitor(){
	if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
    xmlhttp=new XMLHttpRequest();
    }
  else
    {// code for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  xmlhttp.onreadystatechange=function()
    {
    if (xmlhttp.readyState==4 && xmlhttp.status==200)
      {
  	   // alert(xmlhttp.responseText);
          document.getElementById("dvcontent").innerHTML=xmlhttp.responseText;
      }
    }
  var monitorsixteen = document.getElementById('sixteen').value;
  var monitorid = document.getElementById('monitorid').value;
  xmlhttp.open("GET","content-home/content-home.php?monitor16="+monitorsixteen+"&monitor="+monitorid,true);
  xmlhttp.send();
}

function loadTwentyfiveMonitor(){
	if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
    xmlhttp=new XMLHttpRequest();
    }
  else
    {// code for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  xmlhttp.onreadystatechange=function()
    {
    if (xmlhttp.readyState==4 && xmlhttp.status==200)
      {
  	   // alert(xmlhttp.responseText);
          document.getElementById("dvcontent").innerHTML=xmlhttp.responseText;
      }
    }
  var monitortwentyfive = document.getElementById('twentyfive').value;
  var monitorid = document.getElementById('monitorid').value;
  xmlhttp.open("GET","content-home/content-home.php?monitor25="+monitortwentyfive+"&monitor="+monitorid,true);
  xmlhttp.send();
}

function loadThirtysixMonitor(){
	if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
    xmlhttp=new XMLHttpRequest();
    }
  else
    {// code for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  xmlhttp.onreadystatechange=function()
    {
    if (xmlhttp.readyState==4 && xmlhttp.status==200)
      {
  	   // alert(xmlhttp.responseText);
          document.getElementById("dvcontent").innerHTML=xmlhttp.responseText;
      }
    }
  var monitorthirtysix = document.getElementById('thirtysix').value;
  var monitorid = document.getElementById('monitorid').value;
  xmlhttp.open("GET","content-home/content-home.php?monitor36="+monitorthirtysix+"&monitor="+monitorid,true);
  xmlhttp.send();
}

function loadFourtynineMonitor(){
	if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
    xmlhttp=new XMLHttpRequest();
    }
  else
    {// code for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  xmlhttp.onreadystatechange=function()
    {
    if (xmlhttp.readyState==4 && xmlhttp.status==200)
      {
  	   // alert(xmlhttp.responseText);
          document.getElementById("dvcontent").innerHTML=xmlhttp.responseText;
      }
    }
  var monitorfourtynine = document.getElementById('fourtynine').value;
  var monitorid = document.getElementById('monitorid').value;
  xmlhttp.open("GET","content-home/content-home.php?monitor49="+monitorfourtynine+"&monitor="+monitorid,true);
  xmlhttp.send();
}

function loadSixtyfourMonitor(){
	if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
    xmlhttp=new XMLHttpRequest();
    }
  else
    {// code for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  xmlhttp.onreadystatechange=function()
    {
    if (xmlhttp.readyState==4 && xmlhttp.status==200)
      {
  	//    alert(xmlhttp.responseText);
          document.getElementById("dvcontent").innerHTML=xmlhttp.responseText;
      }
    }
  var monitor64= document.getElementById('sixtyfour').value;
  var monitorid = document.getElementById('monitorid').value;
  xmlhttp.open("GET","content-home/content-home.php?monitor64="+monitor64+"&monitor="+monitorid,true);
  xmlhttp.send();
}
</script>
<?php 
set_time_limit(0);
sleep(10);
?>

<select size="1" name="monitorid" id="monitorid" style="width: 20%;height: 22px;background: gray;color:white;" onchange="loadContentHome();">
<?php while ($rowmonitor = mysql_fetch_array($selectallmonitor)){?>
	<option value="<?=$rowmonitor[Monitor_ID]?>" id="idmonitor"><?php echo $rowmonitor[Name]?></option>
	<?php }?>
</select>
<div id="dvcontent" style="background: #618092"></div>
<div style="display: inline-block;">
<input type="button" name="one" id="one" value="1" onclick="loadOneMonitor();">
<input type="button" name="four" id="four" value="4" onclick="loadFourMonitor()">
<input type="button" name="nine" id="nine" value="9" onclick="loadNineMonitor()">
<input type="button" name="sixteen" id="sixteen" value="16" onclick="loadSixteenMonitor()">
<input type="button" name="twentyfive" id="twentyfive" value="25" onclick="loadTwentyfiveMonitor()">
<input type="button" name="thirtysix" id="thirtysix" value="36" onclick="loadThirtysixMonitor()">
<input type="button" name="fourtynine" id="fourtynine" value="49" onclick="loadFourtynineMonitor()">
<input type="button" name="sixtyfour" id="sixtyfour" value="64" onclick="loadSixtyfourMonitor();">
</div>
<?php mysql_close($connection);?>